-
-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MARC21/XML support #659
Conversation
- ST_GeomFromMARC21: extracts geometries from MARC21 documents - ST_AsMARC21: generates MARC21 documents from geometries
@pramsey @jimjonesbr Are we ready to push this thru now? |
@robe2 I've already addressed the points made by @pramsey and @strk, except the suggestion of @pramsey to use regex in a specific function. Nevertheless, I refactored it to make things more readable and avoid memcpy calls (I hope it is more palatable now: #11bedb6). I was waiting for the other reviewers to make any further change to the code. |
- adds null check in the literal input in 'is_literal_valid - removes unnecessary lwgeom_free(geom) in 'ST_GeomFromMARC21' - changes '$libdir/postgis-3' to 'MODULE_PATH' in PLpg/SQL function - changes 'PG_GETARG_GSERIALIZED_P_COPY' to 'PG_GETARG_GSERIALIZED_P' in 'ST_AsMARC21' - changes sprintf calls to snprintf in 'corner_to_subfield_sb'
Anyone else have anything to say before I commit this. I'm going to ignore the cloud drone failure since the PG 11 run passed and looked like the rest was just halted for some reason. |
This has been squashed into master now. |
Tests are failing on 32bit architecture (rounding?): https://gitlab.com/postgis/postgis/-/pipelines/473567768 |
@strk Yes, it's a rounding problem. It seems I accidentally skipped the roundoff ST_AsTest(geom, 5) in a few test cases |
@jimjonesbr Still getting slight rounding issue on windows - https://trac.osgeo.org/postgis/ticket/5104
E129.258333333333325754210818558931350708007812 vs. E129.258333333333325754210818558931350708007813 |
Hi @robe2. These tests were originally designed to make sure one can create coordinates in marc with as much decimal places as wanted... but now I see it creates too much trouble across architectures and platforms. I will send a PR with an alternative test. |
Hi @robe2 |
Add functions ST_AsMARC21 and ST_GeomFromMARC21 with their XML documentation files and regression tests.